package com.gurumades.jsonform.client.forms;

public class FormWidgetFactory {
	public static FormItemViewIF createWidget(String type){
		
		String[] segments = type.split("-");
		
		if (segments[0].equals("text")) {
			return new FormItemViewTextInput(segments[1]);
		}else if (segments[0].equals("boolean")) {
			return new FormItemViewCheckBox();
		}
		
		return null;
	}
}
